/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ourgame.tankgame.barrier;

import com.jme3.bounding.BoundingBox;
import com.jme3.math.Vector3f;
import com.jme3.scene.Spatial;

/**
 *
 * @author L
 */
public class BarrierProcess {

    public static Vector3f processPos(int barrierCount, Vector3f startPos, Spatial spa) {
        BoundingBox worldBound = (BoundingBox) spa.getWorldBound();
        Vector3f extent = worldBound.getExtent(null);
        Vector3f vec = new Vector3f(startPos.x + barrierCount * extent.x * 2, 0, 0);
//        spa.setLocalTranslation(startPos.x + barrierCount * extent.x / 4, 0, 0);
        return vec;
    }
}
